<template name="messages_search">
  <div class="modal-header">
    {{> messages_header_button 
      className="before go-messages" 
      iconName="navigate_before"
    }}
    <h5 class="modal-title font-weight-bold">新私信</h5>
    {{> messages_header_close_button}}
  </div>
  <div class="modal-message-body">
    <div class="modal-body" id="messages-search-ps">
      <div class="input-group mb-3">
        <div class="input-group-prepend">
          <span class="input-group-text">@</span>
        </div>
        <input type="text" class="form-control" id="messages-search-input" placeholder="用户名">
      </div>
      <div class="flex-grow-1">
        {{#if results.count}}
          <h6 class="font-weight-bold mb-0">好友</h6>
        {{/if}}
        <div class="listview list-new-message">
          {{#each result in results}}
            {{> messages_search_list_item friend=result}}
          {{else}}
            {{#unless loading}}
              <div class="p-3 text-center">
                <p class="text-muted">😅 没有找到好友</p>
              </div>
            {{else}}
              {{> loader_ball_beat}}
            {{/unless}}
          {{/each}}
        </div>
      </div>
    </div>
  </div>
</template>